//
//  LBView.m
//  Temp
//
//  Created by dllo on 15/4/21.
//  Copyright (c) 2015年 不二晶. All rights reserved.
//

#import "LBView.h"

@implementation LBView

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self create];
    }
    return self;
}

- (void)create{
    self.corView = [[UIView alloc] initWithFrame:CGRectMake(30, 0, self.frame.size.width - 50, self.frame.size.height - 50)];
    [self addSubview:self.corView];
    self.corView.backgroundColor = [UIColor blackColor];
    self.corView.layer.cornerRadius = (self.frame.size.width - 50) / 2;
    self.corView.layer.masksToBounds = YES;
    
    self.myButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.myButton.frame = CGRectMake(5, 5, self.corView.frame.size.width - 10, self.corView.frame.size.height - 10);
    self.myButton.layer.cornerRadius = (self.corView.frame.size.width - 10) / 2;
    self.myButton.layer.masksToBounds = YES;
    [self.corView addSubview:self.myButton];
    
    self.myLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.frame.size.height - 40, self.frame.size.width, 40)];
    self.myLabel.textAlignment = NSTextAlignmentCenter;
    self.myLabel.textColor = [UIColor blueColor];
    [self addSubview:self.myLabel];
    [_myLabel release];
}
- (void)dealloc
{
    [_myLabel release];
    [_myButton release];
    [_corView release];
    [super dealloc];
}
@end
